package com.yanyu.space.member.controller.feign;

import com.yanyu.space.common.core.bean.web.R;
import com.yanyu.space.member.bean.bo.StudentBo;
import com.yanyu.space.member.feign.IMemberClient;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author yanyu
 */
@RestController
@Slf4j
public class MemberClient implements IMemberClient {

    @Override
    public R<String> testRequestParam(String param) {
        log.info("参数：{}", param);
        return R.ok("testRequestParam");
    }

    @Override
    public R<String> testRequestBody(StudentBo bo) {
        log.info("参数：{}", bo);
        return R.ok("testRequestBody");
    }

    @Override
    public R<String> testThrowFallbackFactory1(String param) {
        log.info("参数：{}", param);
        int i = 1/0;
        return R.ok("testThrowFallbackFactory1");
    }

    @Override
    public R<String> testThrowFallbackFactory2(String param) {
        log.info("参数：{}", param);
        int i = 1/0;
        return R.ok("testThrowFallbackFactory2");
    }
}
